package com.cynoware.multilanguage;

import java.util.Locale;

import android.app.Application;

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        
        if (SPUtils.getString(this, SPUtils.LANGUAGE).length()>0){
            int type = Integer.parseInt(SPUtils.getString(this, SPUtils.LANGUAGE));
            switch (type) {
                case 1:
                    LanguageUtil.changeApp(this,Locale.SIMPLIFIED_CHINESE );
                    break;
                case 2:
                    LanguageUtil.changeApp(this, Locale.US );
                    break;
                case 3:
                    LanguageUtil.changeApp(this, Locale.SIMPLIFIED_CHINESE);
                    break;
            }
        }

    }
}